demonstrate bug with nested calculations that reference the actor via…#716
Merged
zachdaniel merged 1 commit intoash-project:mainfrom Mar 17, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… context
I've on occasion used the actor in the
contextarg on a calculation. This can be useful to use instead of^actor(...)templates in some scenarios for a few reasons, but those reasons aside, it's something that definitely feels like should be supported as things are currently written.I've run into this issue though, where if a calculation references another calculation, when
expression/2is called on the calculation module, the actor passed to the calculation module is nil, even when an actor is passed to the query that loaded the calculation. It seems like wherever the "inner" calculation'sexpressioncallback is called, the framework is not managing to pass the actor through to it, so things don't function as expected. I've tried to figure out where this is, and I do not know if it is in ash core or ash_postgres.Contributor checklist
Leave anything that you believe does not apply unchecked.